package cate.game.play.config;

import cate.game.play.config.buff.BuffCfgHolder;
import cate.game.play.config.destiny.DestinyCfgHolder;
import cate.game.play.config.enhance.SkillEnhanceHolder;
import cate.game.play.config.camp.CampAttrCfgHolder;
import cate.game.play.config.scene.SceneCfgHolder;
import cate.game.play.config.skill.SkillCfgHolder;
import cate.game.play.support.PlayBuildContext;
import cate.game.table.TableManager;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("剧本相关配置")
public class AllPlayCfg {

    @NoteField("解析后的技能配置")
    public SkillCfgHolder skill = new SkillCfgHolder();

    @NoteField("解析后的buff配置")
    public BuffCfgHolder buff = new BuffCfgHolder();

    @NoteField("解析后的阵营属性配置")
    public CampAttrCfgHolder campAttr = new CampAttrCfgHolder();

    @NoteField("解析后的场景配置")
    public SceneCfgHolder scene = new SceneCfgHolder();

    @NoteField("解析后的技能强化配置")
    public SkillEnhanceHolder enhance = new SkillEnhanceHolder();

    @NoteField("解析后的天命配置")
    public DestinyCfgHolder destiny = new DestinyCfgHolder();

    public void init(TableManager table) {
        this.skill.init(table);
        this.buff.init(table);
        this.campAttr.init(table);
        this.scene.init(table);
        this.enhance.init(table);
        this.destiny.init(table);
    }

    public void init(PlayBuildContext context) {
        this.skill.init(context);
        this.buff.init(context);
        this.campAttr.init(context);
        this.scene.init(context);
        this.enhance.init(context);
        this.destiny.init(context);
    }
}
